package com.hsbc.dev.teamo4.sms.sm.service.impl;

import com.hsbc.dev.teamo4.sms.sm.dao.IUserRoleDao;
import com.hsbc.dev.teamo4.sms.sm.dao.impl.UserRoleDaoImpl;
import com.hsbc.dev.teamo4.sms.sm.po.UserRole;
import com.hsbc.dev.teamo4.sms.sm.service.IUserRoleService;

import java.util.List;

/**
 * @author:Kevin
 * @version:
 * @Project: permission_manage
 * @Package: com.hsbc.dev.teamo4.sms.sm.service.impl
 * @Description:
 * @Date date: 2018/7/30
 */
public class UserRoleServiceImpl implements IUserRoleService {
    private IUserRoleDao iUserRoleDao=new UserRoleDaoImpl();
    @Override
    public UserRole save(UserRole userRole) {
        return iUserRoleDao.saveEntity(userRole);
    }

    @Override
    public UserRole update(UserRole userRole) {
        return iUserRoleDao.updateEntity(userRole);
    }

    @Override
    public UserRole queryById(String id) {
        return iUserRoleDao.queryById(id);
    }

    @Override
    public List<UserRole> queryEntityList() {
        return iUserRoleDao.queryAllEntity();
    }

    @Override
    public int updateByIsEnable(String id, Boolean bool) {
        return iUserRoleDao.updateByIsEnable(id,bool);
    }

    @Override
    public List<String> getRoleIdListByUserId(String userId) {
        return iUserRoleDao.getRoleIdListByUserId(userId);
    }
}
